package com.shanglida.base;

import android.content.Context;
import android.database.sqlite.SQLiteDatabase;
import android.database.sqlite.SQLiteOpenHelper;

/**
 * @author liu
 * @deprecated 本地数据库存储用户数据
 * @date 2014-02-25 PM
 * @company 广州尚礼达信息科技有限公司
 * @version 1.0
 */
public class DaseHelper extends SQLiteOpenHelper {

	static String name = "userinfo.db";
	static int dbVersion = 1;

	public DaseHelper(Context context) {
		super(context, name, null, dbVersion);
	}

	/*
	 * (non-Javadoc) 创建一个表 ID自增长 用户名username 密码password 手机号码numbile 重复密码paesword
	 * 
	 * @see
	 * android.database.sqlite.SQLiteOpenHelper#onCreate(android.database.sqlite
	 * .SQLiteDatabase)
	 */
	@Override
	public void onCreate(SQLiteDatabase db) {
		String sql = "create table user(id integer primary key autoincrement,username varchar(64) NOT NULL,numbile varchar(64) NOT NULL,password varchar(64)  NOT NULL,paesword varchar(64) NOT NULL)";
		db.execSQL(sql);
	}

	@Override
	public void onUpgrade(SQLiteDatabase db, int oldVersion, int newVersion) {
		
	}

}
